@echo off
color 0E
setlocal
set curdir=%~dp0
cd /d %curdir%

echo test am i admin? > %SystemRoot%\System32\ThinkVenus.test
if not exist "%SystemRoot%\System32\ThinkVenus.test" (
    echo  Warning: please run as an administrator!
    pause
    exit
)
del %SystemRoot%\System32\ThinkVenus.test

if exist "%curdir%..\tmp\application.pid" (
    for /f "delims=" %%a in (%curdir%..\tmp\application.pid) do (
        taskkill /f /pid %%a
    )
    DEL /F /A /Q "%curdir%..\tmp\application.pid"
) else (
    echo 'application.pid' file could not be found.
)

pause